package com.cicc.beergamevirtualsimulationsystem.common.errorEnum;

import com.cicc.beergamevirtualsimulationsystem.common.enums.RecordEnum.DeliverStatus;
import com.cicc.beergamevirtualsimulationsystem.common.enums.RecordEnum.OrderGoodsStatus;
import lombok.Getter;

@Getter
public enum RecordErrorEnum {
    PERIOD_RECORD_NOT_NULL_ERROR(50005001, "周期记录已存在"),
    PERIOD_RECORD_NULL_ERROR(50005002, "周期记录不存在"),
    PERIOD_RECORD_DETAIL_NULL_ERROR(50005003, "周期记录明细不存在"),
    DELIVER_QUANTITY_GT_INVENTORY_ERROR(50005004, "发货量大于库存量"),
    DELIVER_QUANTITY_GT_ACCUMULATE_OWE_QUANTITY_ERROR(50005005, "发货量大于累计欠货量"),
    ROLE_PARAMETER_NULL_ERROR(50005006, "角色参数不存在"),
    IS_ORDER_GOODS_ERROR(50005007, OrderGoodsStatus.ORDER_GOODS.getDesc()),
    IS_DELIVER_ERROR(50005008, DeliverStatus.DELIVER.getDesc()),
    CAPACITY_LEVEL_ERROR(50005009, "计划生产量与工厂产能级别不匹配"),
    DELIVER_QUANTITY_ZERO_ERROR(50005010, "发货量为0"),
    CAPACITY_MAX_ERROR(50005011, "工厂产能级别已为最高级别"),
    NOT_FACTORY_ERROR(50005012, "只有工厂能进行产能升级")
    ;

    private final Integer code;
    private final String msg;

    RecordErrorEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
}
